﻿@if ( ParentPageList?.Ordered == true )
{
    <OrderedListItem Margin="Margin.Is2.FromBottom">
        @if ( To != null )
        {
            <Anchor To="@To" TextColor="TextColor.Primary">@ToText</Anchor>
        }
        @ChildContent
    </OrderedListItem>
}
else
{
    <UnorderedListItem Margin="Margin.Is2.FromBottom">
        @if ( To != null )
        {
            <Anchor To="@To" TextColor="TextColor.Primary">@ToText</Anchor>
        }
        @ChildContent
    </UnorderedListItem>
}
@code {
    [Parameter] public string To { get; set; }

    [Parameter] public string ToText { get; set; }

    [CascadingParameter] public BlogPageList ParentPageList { get; set; }

    [Parameter] public RenderFragment ChildContent { get; set; }
}
